package com.yugao.fintech.libra.constants;

import com.yugao.fintech.framework.assistant.utils.exception.BaseError;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

@Getter
@AllArgsConstructor
public enum SysErrorEnum implements BaseError {
    TENANT_NOT_EXISTS("租户不存在", -1, HttpStatus.NOT_FOUND),
    TENANT_DISABLE("租户被禁用", -1, HttpStatus.BAD_REQUEST),
    TENANT_EXPIRE("租户已过期", -1, HttpStatus.BAD_REQUEST),
    TENANT_NOT_EFFECTIVE_TIME("租户尚未到达生效时间", -1, HttpStatus.BAD_REQUEST),
    TENANT_PACKAGE_NOT_EXISTS("租户套餐不存在", -1, HttpStatus.NOT_FOUND),
    TENANT_PACKAGE_DISABLE("租户套餐被禁用", -1, HttpStatus.BAD_REQUEST),
    TENANT_CAN_NOT_UPDATE_SYSTEM("系统租户不能进行修改、删除等操作！", -1, HttpStatus.BAD_REQUEST),
    TENANT_DOMAIN_EXIST("租户域名已被占用", -1, HttpStatus.BAD_REQUEST),
    ROLE_ADMIN_CODE_ERROR("编码【{}】不能使用", -1, HttpStatus.BAD_REQUEST),
    ROLE_NAME_DUPLICATE("已经存在名为【{}】的角色", -1, HttpStatus.BAD_REQUEST),
    ROLE_CODE_DUPLICATE("已经存在编码为【{}】的角色", -1, HttpStatus.BAD_REQUEST),
    ROLE_NOT_EXISTS("角色不存在", -1, HttpStatus.NOT_FOUND),
    ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE("不能操作系统内置角色", -1, HttpStatus.NOT_FOUND),
    ROLE_CAN_NOT_OPERATE_ADMIN("不能操作管理员角色", -1, HttpStatus.BAD_REQUEST),

    ROLE_CAN_NOT_DELETE_SYSTEM("不能删除系统维护的角色", -1, HttpStatus.BAD_REQUEST);

    private final String message;

    private final Integer code;
    private final HttpStatus status;
}
